package org.example.juc.thread;

/**
 * @Description 线程基本创建操作
 *  1：Thread 2: Runnable 3:Executors.newCachedThrad
 * @author songyafei
 */
public class HowToCreateThreadTest {
    static class MyThread extends Thread {
        @Override
        public void run() {
            System.out.println("Hello MyThread!");
        }
    }

    static class MyRun implements Runnable {
        @Override
        public void run() {
            System.out.println("Hello MyRun!");
        }
    }

    public static void main(String[] args) {
        new MyThread().start();
        new Thread(new MyRun()).start();
        new Thread(()->{
            System.out.println("Hello Lambda!");
        }).start();
    }

}


